{include "Public/header"}
<script type="text/javascript">
$(function(){
	$(":submit").click(function(){
		var start_date=$("input[name='start_date']").val();
		var end_date=$("input[name='end_date']").val();
		if(start_date!=""&&end_date!=""&&end_date<start_date){
			show_error_message("搜索失败","结束日期不能大于开始日期");
			return false;
		}
	});
	$("#search").click(function(){
		$("form").attr("action","");
	});
	$("#output").click(function(){
		$("form").attr("action","{:U('attendanceOutput')}");
	});
});
</script>
		<div class="page_tit">{$title}</div>
		<!-- START TOOLBAR -->
		<form action="" method="get">
		<div class="Toolbar_inbox">
			<div class="page right"></div>
			 开始日期:<input type="text" name="start_date" class="s-txt" onfocus="WdatePicker()" value="{$_GET['start_date']|''}" />
			结束日期:<input type="text" name="end_date" class="s-txt" onfocus="WdatePicker()" value="{$_GET['end_date']|''}" />
			作业编号:<input type="text" name="number" class="s-txt" value="{$_GET['number']|''}" />
			作业员:<select name="realname">
			{foreach $admin_list as $v}
			<option {if isset($_GET['realname'])&&$_GET['realname']==$v['realname']}selected="selected"{/if} value="{$v['realname']}">{$v['realname']}</option>
			{/foreach}
			</select>
			<input type="submit" class="btn_a" id="search" value="  搜索  " />
			<input type="submit" class="btn_a" id="output" value="  导出  " />
		</div>
		</form>
		<!-- END TOOLBAR -->
		<!-- START LIST -->
		<div class="list" id="list">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tbody>
					<tr>
						<th style="width: 30px;"><input type="checkbox" id="checkAll">
						</th>
						<th class="line_l">作业员姓名</th>
						<th class="line_l">服务起止点</th>
						<th class="line_l">施救出发时间</th>
						<th class="line_l">施救结束时间</th>
						<th class="line_l">本次施救用时小计</th>
						<th class="line_l">作业车牌号</th>
						<th class="line_l">当事车牌号</th>
						<th class="line_l">作业单号</th>
						<th class="line_l">链接</th>
					</tr>
					{foreach $list as $v}
					<tr>
						<td><input type="checkbox" value="{$v['id']}" name="id[]"></td>
						<td>{$v['realname']}</td>
						<td>{$v['drag_start_direction']}</td>
						<td>{$v['rescue_start_time']}</td>
						<td>{$v['rescue_end_time']}</td>
						<td>{$v['rescue_last_time']}</td>
						<td>{:get_rescue_car('rescue',$v['id'])}</td>
						<td>{$v['license_plate_number']}</td>
						<td>{$v['number']}</td>
						<td>
						{if $v['status']==3}
						<a href="{:U('Rescue/prit?id='.$v['id'])}" target="_blank">作业单</a>
						{/if}
						</td>
					</tr>
					{/foreach}
				</tbody>
			</table>
			<div class="Toolbar_inbox">
			<div class="page right">
			{$page}
			</div>
		</div>
		</div>
		<!-- END LIST -->

	</div>
{include "Public/footer"}